package com.bo.baby2.dao;

import com.bo.baby2.entity.BorrowQuery;
import com.bo.baby2.entity.TBid;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
* @program: baby2_p2p
*
* @description: ${description}
*
* @author:波
*
* @create: 2020-07-14 21:18
**/


public interface TBidMapper {
    int deleteByPrimaryKey(String id);

    int insert(TBid record);

    int insertSelective(TBid record);

    TBid selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(TBid record);

    int updateByPrimaryKey(TBid record);

    /***
     * 根据借款id查询投标记录
     * @param borrowId
     * @return
     */
    List<TBid> getBidByBorrowId(String borrowId);

    /**
     * 根据用户投标人id和借款Id查询是否投标过
     * @param UserId
     * @return
     */
    TBid getBidByUserId(@Param("UserId") String UserId, @Param("borrowId") String borrowId);

    List<TBid> getBids(BorrowQuery borrowQuery);
    int getCount(BorrowQuery borrowQuery);
}
